import React, {Component} from 'react'
import HOCFactory from './Hoc'


const App = (props) => {
    console.log({...props})
    return (
        <div>App列表</div>
    )
}

//复用高阶组件
const BetterHoc = HOCFactory(App)

export default class HocDemo extends Component {
    state = {
        data: {
            a: 1
        }
    }

    render() {
        return (
            <div>
                <h2>高阶组件 抽离组件</h2>
                <BetterHoc data={this.state.data}/>
            </div>
        );
    }
}





